package com.gxuwz.attend.service.Impl;

import com.gxuwz.attend.dao.DepartmentDao;
import com.gxuwz.attend.entity.Department;
import com.gxuwz.attend.service.DepartmentService;

import java.util.List;

//二级学院业务实现类
public class DepartmentServiceImpl implements DepartmentService {
    private DepartmentDao departmentDao;

    public void setDepartmentDao(DepartmentDao departmentDao) {
        this.departmentDao = departmentDao;
    }

    /**
     * 添加二级学院
     * @param dep
     */
    @Override
    public void insertDep(Department dep){
        departmentDao.insertDep(dep);
    }

    /**
     * 删除二级学院
     * @param id
     */
    @Override
    public void deleteDep(String id){

        departmentDao.deleteDep(id);
    }

    /**
     * 更新二级学院
     * @param dep
     */
    @Override
    public void updateDep(Department dep){

        departmentDao.updateDep(dep);
    }

    /**
     * 查询全部二级学院
     * @return
     */
    @Override
    public List<Department> queryDeps(){
        return departmentDao.queryDeps();

    }

    /**
     * 模糊查询二级学院数据
     * @param dep
     * @return
     */
    @Override
    public List<Department> queryDep(Department dep){
        return departmentDao.queryDep(dep);
    }
}
